<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="s_s" :rules="rules" label-width="100px" id="mvcfm"> 公司 <el-select @change="list_l_firm" v-model="s_s.CMID7">
        <el-option label="－－无－－" value='' />
        <el-option v-for="dict in l_firm" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
      </el-select> 人员 <el-select @change="list_s_person" v-model="s_s.CMID8">
        <el-option label="－－无－－" value='' />
        <el-option v-for="dict in s_person" :key="dict.__code" :label="dict.__desc" :value="dict.__code"></el-option>
      </el-select>
      <el-button @click="gotoPage('3EDD84B2D8EE4447A08352DC263DC7C3?'+vueparams+'')" type='success' size="mini"><i class='fa fa-plus'></i>增加潜在客户</el-button>
      <div>
      </div>
      <div class="form-unit">
        <span class="mvc-title-left"> 时间设置 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="24">
            {{empty}}
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            {{empty}}
          </el-col>
        </el-row>
      </div>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'StationTimeAdmin',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_s: {},
        l_firm: [],
        s_person: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/oa/humanresources/StationTimeAdmin/stationTimeAdmin?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
      list_l_firm(value) {
        if (this.$route.fullPath.indexOf("?") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "?CMID7=" + value);
        } else if (this.$route.fullPath.indexOf("CMID7=") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "&CMID7=" + value);
        } else {
          this.gotoPage("/redirect/oa/humanresources/StationTimeAdmin?" + this.vueparams, {
            CMID7: value
          });
        }
      },
      list_s_person(value) {
        if (this.$route.fullPath.indexOf("?") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "?CMID8=" + value);
        } else if (this.$route.fullPath.indexOf("CMID8=") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "&CMID8=" + value);
        } else {
          this.gotoPage("/redirect/oa/humanresources/StationTimeAdmin?" + this.vueparams, {
            CMID8: value
          });
        }
      },
    },
  }
</script>
